package ihm.manes_ho.agenda.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * This class represents a rendez-vous item.
 * <p> Each rendez-vous item contains many rendez-vous entities each of which has type of MeetingVO
 */
public class MeetingItemVO {
	//bidirectional..
	private List<MeetingVO> meetingList;
	
	public MeetingItemVO() {
		meetingList = new ArrayList<MeetingVO>();
	}
	
	public List<MeetingVO> getMeetingList() {
		return meetingList;
	}	

	public void addMeeting(MeetingVO meeting) {
		getMeetingList().add(meeting);
		//bidirectional...
		meeting.setMeetingItem(this);
	}
	
	public void removeMeeting(MeetingVO meeting) {
		getMeetingList().remove(meeting);
	}
	
	public void removeMeeting(int index) {
		getMeetingList().remove(index);
	}
	
	public void removeAll() {
		getMeetingList().clear();
	}
}
